package com.mingliqiye.minecraft.enchantment.conflict.common;

import java.net.InetSocketAddress;
import java.net.SocketAddress;

public class NetWorkUtils {

    public static boolean isLocalAddress(SocketAddress address) {
        if (!(address instanceof InetSocketAddress inetAddr)) {
            return false;
        }
        return (inetAddr.getAddress().isLoopbackAddress() || inetAddr.getAddress().isAnyLocalAddress());
    }
}
